﻿<Window x:Class="CSSAdriverapp.EditVehicle"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Edit Vehicle" Height="483" Width="500" Background="#C5AFB1AF" xmlns:my="clr-namespace:CSSAdriverapp" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:EditVehicle, AncestorLevel=1}, Path=vehicles}" ResizeMode="NoResize" Icon="/CSSA%20Driver%20App;component/lorry_green_256.ico">
    <Grid>
        <Rectangle Height="100" HorizontalAlignment="Left" Margin="168,102,0,0" Name="selectionRectangle" Stroke="Black" VerticalAlignment="Top" Width="289" Fill="#FF9CB6B3" />
        <DataGrid AutoGenerateColumns="False" Height="373" HorizontalAlignment="Left" Margin="12,12,0,0" Name="vehicleNameDataGrid" VerticalAlignment="Top" Width="129" ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:EditVehicle, AncestorLevel=1}, Path=vehicles}" SelectionChanged="vehicleNameDataGrid_SelectionChanged" GridLinesVisibility="None" CanUserAddRows="False" CanUserResizeColumns="False" AreRowDetailsFrozen="False" SelectionMode="Single" IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=Name}" Header="Name" />
            </DataGrid.Columns>
        </DataGrid>
        <Label Content="Name:" Height="28" HorizontalAlignment="Left" Margin="168,1,0,0" Name="label1" VerticalAlignment="Top" />
        <Label Height="46" HorizontalAlignment="Left" Margin="168,22,0,0" Name="nameLabel" VerticalAlignment="Top" Width="289" FontWeight="Bold" FontSize="22" Background="#FFE5E5E5" />
        <Label Content="Availability" Height="28" HorizontalAlignment="Left" Margin="168,79,0,0" Name="availabilityHeadingLabel" VerticalAlignment="Top" FontStyle="Italic" />
        <DataGrid AutoGenerateColumns="False" Height="176" HorizontalAlignment="Left" Margin="168,207,0,0" Name="timeDataGrid" VerticalAlignment="Top" Width="289" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:EditVehicle, AncestorLevel=1}, Path=vehicleavailability}" ItemsSource="{Binding}" GridLinesVisibility="None" CanUserAddRows="False" IsReadOnly="True" SelectionMode="Single">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=day}" Header="Day"  />
                <DataGridTextColumn Binding="{Binding Path=starttime, StringFormat={}{0: hh:mm tt}}" Header="Start Time" />
                <DataGridTextColumn Binding="{Binding Path=endtime, StringFormat={}{0: hh:mm tt}}" Header="End Time" />
            </DataGrid.Columns>
        </DataGrid>
        <Button Content="Add" Height="23" HorizontalAlignment="Left" Margin="375,171,0,0" Name="addButton" VerticalAlignment="Top" Width="75" Click="addButton_Click" />
        <Button Content="Delete Time" Height="23" HorizontalAlignment="Left" Margin="382,389,0,0" Name="deleteTimeButton" VerticalAlignment="Top" Width="75" Click="deleteTimeButton_Click" />
        <ComboBox HorizontalAlignment="Left" Margin="220,114,0,0" Name="dayComboBox" Width="140" Height="26" VerticalAlignment="Top" />
        <Label Content="Day:" Height="28" HorizontalAlignment="Left" Margin="176,112,0,0" Name="label6" VerticalAlignment="Top" />
        <Label Content="Start:" Height="28" HorizontalAlignment="Left" Margin="171,140,0,0" Name="label7" VerticalAlignment="Top" />
        <Label Content="End:" HorizontalAlignment="Left" Margin="176,170,0,0" Name="label8" Height="28" VerticalAlignment="Top" />
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="220,143,0,0" Name="startHourComboBox" VerticalAlignment="Top" Width="42" />
        <ComboBox Height="23" Margin="270,143,0,0" Name="startMinuteComboBox" VerticalAlignment="Top" HorizontalAlignment="Left" Width="42" />
        <Label Content=":" Height="28" HorizontalAlignment="Left" Margin="259,141,0,0" Name="startColonLabel" VerticalAlignment="Top" />
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="318,143,0,0" Name="startAmPmComboBox" VerticalAlignment="Top" Width="42" />
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="220,172,0,0" Name="endHourComboBox" VerticalAlignment="Top" Width="42" />
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="270,172,0,0" Name="endMinuteComboBox" VerticalAlignment="Top" Width="42" />
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="318,172,0,0" Name="endAmPmComboBox" VerticalAlignment="Top" Width="42" />
        <Label Content=":" Height="28" HorizontalAlignment="Left" Margin="259,168,0,0" Name="endColonLabel" VerticalAlignment="Top" />
        <Label Height="28" HorizontalAlignment="Left" Margin="370,140,0,0" Name="missingFieldLabel" VerticalAlignment="Top" Width="87" Content="Missing Field" Foreground="#FFF80D0D" Visibility="Hidden" OpacityMask="#FF740000" FontWeight="Normal" FontSize="13" />
        <Button Height="23" Margin="168,389,0,0" Name="markUnavailableButton" VerticalAlignment="Top" Content="Mark Unavailable" Click="markUnavailableButton_Click" HorizontalAlignment="Left" Width="101" />
        <Rectangle Height="100" HorizontalAlignment="Left" Margin="168,102,0,0" Name="hideAvailabilityRectangle" Stroke="Black" VerticalAlignment="Top" Width="289" Fill="#FFB9B9B9" Visibility="Hidden" />
        <Label Content="Currently Unavailable" Height="43" HorizontalAlignment="Left" Margin="220,134,0,0" Name="unavailabilityLabel" VerticalAlignment="Top" Width="191" FontSize="18" Visibility="Hidden" />
        <Button Content="Delete Vehicle" Height="23" HorizontalAlignment="Left" Margin="368,73,0,0" Name="deleteVehiclesButton" VerticalAlignment="Top" Width="89" Click="deleteVehiclesButton_Click" />
    </Grid>
</Window>
